home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / developm / language / pixie.cpt / Pixie Scheme ƒ / Pixie Scheme Help / card_37207.txt < prev    next >
Encoding:
Text File  |  1991-01-07  |  642 b   |  24 lines

  1. -- card: 37207 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 2692
  5. -- name: 
  6.  
  7.  
  8. -- part contents for background part 10
  9. ----- text -----
  10. result returned by the procedure is itself evaluated.
  11.     Here is a simple example.  Suppose you are tired of writing assignment statements in the form "(set! foo bar)", and would rather write them as "(assign bar to foo)"  Define the macro:
  12.  
  13.     (e::macro assign
  14.       (lambda (form)
  15.         `(set! ,(cadddr form) ,(cadr form))))
  16.  
  17. You can then write
  18.  
  19.     (define foo #f)          => foo
  20.     (assign 3 to foo)        => foo
  21.  
  22. -- part contents for background part 47
  23. ----- text -----
  24. 162